import request from '@/utils/request'

// 校区列表
export function listCampus(query) {
    return request({
        url: "/dormitory/dms-campus/list",
        method: "GET",
        params: query
    })
}

// 新增校区
export function addCampus(data) {
    return request({
        url: '/dormitory/dms-campus/add',
        method: 'post',
        data: data
    })
}

// 修改校区
export function updateCampus(data) {
    return request({
        url: '/dormitory/dms-campus/update',
        method: 'post',
        data: data
    })
}

// 删除校区
export function delCampus(id) {
    return request({
        url: '/dormitory/dms-campus/delete',
        method: 'post',
        data: id
    })
}

// 校区详情
export function getCampus(id) {
    return request({
        url: "/dormitory/dms-campus/" + id,
        method: 'get'
    })
}
